---@class Table_GlobalErrorItem
local Table_GlobalErrorItem = BaseClass("Table_GlobalErrorItem", IDataItem)

function Table_GlobalErrorItem:__ctor()
	---@type number @唯一ID
	self.Id = 0
	---@type number @内容ID
	self.ContentId = 0
	---@type number @播放音效ID
	self.SoundId = 0
end

function Table_GlobalErrorItem:Load(reader)
	self.temp = reader:ReadShortString()
	self.Id = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.ContentId = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.SoundId = tonumber(self.temp)
end

---@class Table_GlobalErrorMgr : IDataMgr
local this = BaseClass("Table_GlobalErrorMgr", IDataMgr)

function this:FileName()
	return "Txt/GlobalError.txt"
end

---@return Table_GlobalErrorItem
function this:GetItemByKey(key)
	return self.super.GetItemByKey(self, key)
end

---@return Table_GlobalErrorItem
function this:GetItemByIdx(idx)
	return self.super.GetItemByIdx(self, idx)
end

function this:Load(reader)
	local item = Table_GlobalErrorItem()
	item:Load(reader)
	self.mItemDic[item.Id] = self.mDataCount
	table.insert(self.mItemList, item)
end

---@type Table_GlobalErrorMgr
Table_GlobalErrorMgr = this()